<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    {if $mode == 'category'}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('店铺中分类')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-shop_category_id" data-rule="required"
                       data-source="wanlshop/shopsort"
                       data-params='{"isTree":1,"custom[shop_id]":{$shop.id}}'
                       data-multiple="true"
                       data-pagination="true"
                       data-page-size="1"
                       class="form-control selectpage"
                       name="row[shop_category_id]"
                       type="text"
                       value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" class="btn btn-danger btn-shopsort" >{:__('新建分类')}</button></span>
                </div>
            </div>
        </div>
    </div>
    {elseif $mode == 'freight'}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Freight_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-freight_id" data-rule="required" data-source="wanlshop/freight" class="form-control selectpage" name="row[freight_id]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" class="btn btn-danger btn-freight" >{:__('新建模板')}</button></span>
                </div>
            </div>
        </div>
    </div>
    {else /}
    {if $mode == 'set'}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('调价模式')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-type" class="form-control selectpicker" name="row[pricing]">
                {foreach name="pricingList" item="vo"}
                <option value="{$key}" >{$vo}</option>
                {/foreach}
            </select>
        </div>
    </div>
    {else/}
    <input type="hidden" name="row[pricing]" value="{$mode}">
    {/if}

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('零售价')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-base" class="form-control" name="row[base][0]" type="text"  placeholder="{$mode == 'set' ? $placeholder : $placeholder.'零售价'}">
        </div>
    </div>
    {volist name="groupList" id="group"}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{$group.name}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  class="form-control" name="row[base][{$group.id}]" type="text"  placeholder="{$mode == 'set' ? $placeholder : $placeholder.$group.name.'零售价'}">
        </div>
    </div>
    {/volist}
    {/if}

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
